Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attempt event for sessionstate #5237

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

metalgearsloth
Copy link
Contributor

No description provided.

var list = new List<SessionState>();
var list = new List<SessionState>(players.Length);
var ev = new GetSessionStateAttempt(session);
_entityManager.EventBus.RaiseEvent(EventSource.Local, ref ev);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really simulation logic so using EventBus here doesn't really make a lot of sense. Just use a regular C# event?

foreach (var client in players)
{
var info = new SessionState
{
UserId = client.UserId,
Name = client.Name,
Name = ev.Cancelled ? string.Empty : client.Name,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just the player name? It doesn't seem very useful to try to hide this info when player names are just public from the auth API anyways.

Status = client.Status,
Ping = client.Channel!.Ping
Ping = client.Channel.Ping,
ControlledEntity = EntManager.GetNetEntity(client.AttachedEntity),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposing the controlled entity seems very powerful, what use does this have for players?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants